<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Serialize a single value into a WDDX packet</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.wddx-packet-start.html">« wddx_packet_start</a></li>
      <li style="float: right;"><a href="function.wddx-serialize-vars.html">wddx_serialize_vars »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.wddx.html">WDDX 函数</a></li>
    <li>Serialize a single value into a WDDX packet</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.wddx-serialize-value" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">wddx_serialize_value</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">wddx_serialize_value</span> &mdash; <span class="dc-title">Serialize a single value into a WDDX packet</span></p>

 </div>
 
 <div id="function.wddx-serialize-value-refsynopsisdiv">
  <div class="warning"><strong class="warning">警告</strong><p class="simpara">该函数已在 PHP 7.4.0 中
<em class="emphasis">移除</em>。</p></div>
 </div>

 <div class="refsect1 description" id="refsect1-function.wddx-serialize-value-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>wddx_serialize_value</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span> <code class="parameter">$var</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$comment</code><span class="initializer"> = ?</span></span>): <span class="type">string</span></div>

  <p class="para rdfs-comment">
   Creates a WDDX packet from a single given value.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.wddx-serialize-value-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">var</code></dt>

     <dd>

      <p class="para">
       The value to be serialized
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">comment</code></dt>

     <dd>

      <p class="para">
       An optional comment string that appears in the packet header.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.wddx-serialize-value-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns the WDDX packet, or <strong><code>false</code></strong> on error.
  </p>
 </div>

</div></div></div></body></html>